//
//  ForumTableViewCell.m
//  Project_A Gary
//
//  Created by leilei on 16/4/3.
//  Copyright © 2016年 www.lei.com. All rights reserved.
//

#import "ForumTableViewCell.h"

@implementation ForumTableViewCell

-(void)dealloc
{
    [_picImg release];
    [_backView release];
    [_titleLable release];
    [_summaryLable release];
    [super dealloc];
}

#pragma mark - 初始化
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backView = [[UIView alloc] init];
        self.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.backView];
        [_backView release];
        
        self.picImg = [[UIImageView alloc] init];
        [self.contentView addSubview:self.picImg];
        
        self.titleLable = [[UILabel alloc] init];
        [self.contentView addSubview:_titleLable];
        [_titleLable release];

        self.summaryLable = [[UILabel alloc] init];
        [self.contentView addSubview:_summaryLable];
        [_summaryLable release];

    }
    return self;
}



#pragma mark - 布局
- (void)layoutSubviews
{
    [super layoutSubviews];
    _backView.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.frame.size.height - 10);
    _picImg.frame = CGRectMake(5, 0, self.contentView.frame.size.width - 10, 150);
    _titleLable.frame = CGRectMake(15, 155, self.picImg.frame.size.width-20, 30);
    _summaryLable.frame = CGRectMake(15, 190, self.picImg.frame.size.width-20, 20);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
